<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Responsive Video Playlist Tutorial</title>
    <!-- custom css file link  -->
    <link rel="stylesheet" href="css/style.css">
    <style>
        @import url('https://fonts.googleapis.com/css2?family=Poppins:wght@100;200;300;400;500;600&display=swap');

        * {
            /* font-family: 'Poppins', sans-serif; */
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            outline: none;
            border: none;
            text-decoration: none;
            text-transform: capitalize;
        }

        body {
            background: rgba(0, 0, 0, 0.5);
            padding: 20px;
        }
        .video_wall {
            width: 1000px;
            height: 430px;
            background-color: #fff;
            position: fixed;
           
        }

        .video-list-container {
            display: flex;
            flex-direction: row;
            overflow-x: scroll;
            border-radius: 5px;
            box-shadow: 0 5px 15px rgba(0, 0, 0, .1);
            background-color: #fff;
            padding: 15px;
        }

        .video-list-container::-webkit-scrollbar {
            width: 1px;
            height: 3px;
        }

        .video-list-container::-webkit-scrollbar-track {
            background-color: #fff;
            border-radius: 5px;
        }

        .video-list-container::-webkit-scrollbar-thumb {
            background-color: #444;
            border-radius: 5px;
        }

        .list {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 15px;
            padding: 16px;
            background-color: #eee;
            cursor: pointer;
            border-radius: 5px;
            margin-bottom: 10px;
        }

        .video-list-container .list.active {
            background-color: #444;
        }

        .video-list-container .list.active .list-title {
            color: #fff;
        }

        .list-video {
            width: 500px;
            border-radius: 5px;
        }

        .list-title {
            font-size: 17px;
            color: #444;
        }
     
        .model_button{
           display: flex;
           margin: 15px 80px; 
           justify-content: space-between;
        }
        .model_confirm{
            display: block;
            width: 123px;
            height: 38px;
            padding: 0 10px;
            line-height: 38px;
            border: 1px solid #d8d7d9;
            border-radius: 4px;
            font-size: 12px;
            color: #ffffff;
            background: rgb(102, 177, 255);
        }
        .model_cancel{
            display: block;
            width: 123px;
            height: 38px;
            padding: 0 10px;
            line-height: 38px;
            border: 1px solid #d8d7d9;
            border-radius: 4px;
            font-size: 12px;
            color: #333;
            background: #fff;
        }
    </style>
</head>

<body>


    <div class="video_wall">
        <div class="video-list-container">

            <div class="list">
                <img src="./avator.png" class="list-video"></img>
                <h3 class="list-title">宣传片</h3>
            </div>
            <div class="list">
                <img src="./avator.png" class="list-video"></img>
                <h3 class="list-title">测试文本</h3>
            </div>



        </div>
        <div class="model_button">
            <button class="model_cancel">取消</button>
            <div></div>
            <button class="model_confirm">确定</button>
        </div>
        
    </div>
    <!-- custom js file link  -->
    <script>

        let videoList = document.querySelectorAll('.video-list-container .list');
        videoList.forEach(vid => {
            vid.onclick = () => {
                videoList.forEach(remove => { remove.classList.remove('active') });
                vid.classList.add('active');
                let src = vid.querySelector('.list-video').src;
                let title = vid.querySelector('.list-title').innerHTML;
                console.log(src, title)

            };
        });


    </script>
</body>

</html>